<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>窗口大小测试</title>
<style type="text/css">
<!--
.topDiv {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
	background-color: #FFFFFF;
	border: 5px solid #747474;
	position:absolute;
	z-index:9999;
	display:none;
	width:500px;
	height:300px;
	margin-top:13%;
	margin-left:23%;
	padding:10px;
}
-->
</style>
<script type="text/javascript">
function showDiv(){
 var winWidth;
 var winHeight;
	if (document.body && document.body.clientHeight && document.body.clientWidth)
		{
			winHeight = document.body.clientHeight;
			winWidth = document.body.clientWidth;
		}
    document.getElementById('show').style.display="block";
    document.getElementById('show_win').style.display="block";
	document.getElementById('show').style.width=winWidth+"px";
	document.getElementById('show').style.height=winHeight+"px";
}
</script>
</head>
<body style="margin:0px;">
<div style="Z-INDEX:8888;POSITION:absolute;-moz-opacity:0.50;opacity:0.3;filter:alpha(opacity=30);BACKGROUND-COLOR:#000;display:none;" id="show">
</div>
<div class="topDiv" id="show_win"><a href="#">你可以看到一个层在最上面了吗???这里就可以放你的登陆框</a></div>
<a href="javascript:void(0);" onclick="javascript:showDiv();">登 陆</a>
<p> </p>
<p> </p>
<p> </p><p> </p>
<p> </p>
<p> </p><p> </p>
<p> </p>
<p> </p><p> </p><p> </p><p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p><p> </p>
<p> </p>
<p> </p><p> </p>
<p> </p>
<p> </p><p> </p><p> </p><p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>